package goleetcode

func accountBalanceAfterPurchase(purchaseAmount int) int {
	i, j := purchaseAmount/10, purchaseAmount%10
	var temp int
	if j < 5 {
		temp = i * 10
	} else {
		temp = (i+1)*10
	}
	return 100 - temp
}
